package service;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import entity.User;
import mapper.UserMapper;

@Service
public class UserService {
	
	@Resource
	UserMapper userMapper;

	public UserMapper getUserMapper() {
		return userMapper;
	}

	public void setUserMapper(UserMapper userMapper) {
		this.userMapper = userMapper;
	}
	
//	public User login(String user_name,String user_password) {
//		return userMapper.login(user_name,user_password);
//	}
	
	public User login(User user) {
		return userMapper.login(user);
	}
	
	public boolean sign(User user) {
		userMapper.sign(user);
		return true;
	}
	
	public List<User> findAllUser(){
		return userMapper.findAllUser();
	}
	
	public boolean deleteUserById(User user) {
		return userMapper.deleteUserById(user);
	}
}
